<!--

    Copyright (C) 2015 The Gravitee team (http://gravitee.io)

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

            http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<div>
  <h1 matDialogTitle>Create Claims</h1>
  <mat-dialog-content>
    <h5>Information</h5>
    <mat-divider></mat-divider>
    <mat-list dense>
      <mat-list-item>
        <mat-icon matListIcon>info</mat-icon>
        <h3 matLine> Tokens claims are statements about the subject or the application, for example name, role, or email address. </h3>
      </mat-list-item>
      <mat-list-item>
        <mat-icon matListIcon>info</mat-icon>
        <h3 matLine> You can use <b>Expression Language</b> or <b>raw value</b> to set the claim values. </h3>
      </mat-list-item>
    </mat-list>

    <h5>Execution Context</h5>
    <mat-divider></mat-divider>
    <small>When the gateway handles an incoming HTTP request, some attributes are automatically created.</small>
    <pre>
      <![CDATA[
      {#request} : Current HTTP Request with parameters, headers, path, ...
      {#context.attributes['client']} : OAuth 2.0 Client with clientId and clientName
      {#context.attributes['user']} : Authenticated User (if available) with username, firstName, lastName, email, roles, groups and claims
      {#context.attributes['authorizationRequest']} : OAuth 2.0 Authorization Request (if available)
      {#context.attributes['tokenRequest']} : OAuth 2.0 Token Request (if available)
      {#context.attributes['authFlow']} : Attributes coming from the Enrich Authentication Flow policy (if available)
      ]]>
    </pre>
  </mat-dialog-content>
  <mat-dialog-actions>
    <span fxFlex></span>
    <button type="button" mat-raised-button (click)="dialogRef.close()" class="dialog-cancel">Close</button>
  </mat-dialog-actions>
</div>
